package com.newtouch.bxzs.business.train.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newtouch.bxzs.business.train.model.bo.PerformanceBO;
import com.newtouch.bxzs.common.base.model.UserAchievement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 机构团队业绩mapper
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/2/24 10:40</td>
 * <td>wangzhen</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author wangzhen
 * @version 1.0.0
 * @since 1.0.0
 */
@Mapper
public interface PerformanceMapper extends BaseMapper<UserAchievement> {

    /**
     * 业绩汇总--年月类型
     *
     * @param userAchievement
     * @param startTime
     * @param endTime
     * @return
     */
    List<PerformanceBO> getPerformanceByMonth(@Param("userAchievement") UserAchievement userAchievement, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 业绩汇总--机构类型
     *
     * @param userAchievement
     * @param startTime
     * @param endTime
     * @return
     */
    List<PerformanceBO> getPerformanceByOrganization(@Param("userAchievement") UserAchievement userAchievement, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 业绩汇总--保险类型
     *
     * @param userAchievement
     * @param startTime
     * @param endTime
     * @return
     */
    List<PerformanceBO> getPerformanceByInsurance(@Param("userAchievement") UserAchievement userAchievement, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 业绩汇总--人员类型
     *
     * @param userAchievement
     * @param startTime
     * @param endTime
     * @return
     */
    List<PerformanceBO> getPerformanceByMember(@Param("userAchievement") UserAchievement userAchievement, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
